package com.qf.service.kucun_service;

import com.qf.bean.Gnumber;
import com.qf.bean.Goods;
import com.qf.dao.kucun_dao.GoodsDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
*
 *                                                 ___----~~~~~~~~~~~------___
 *                                   .  .   ~~//``....          __--~ ~~
 *                   -.            \_|//     |||\\  ~~~~~~::::... /~
 *                ___-==_       _-~o~  \/    |||  \\            _/~~-
 *        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *  .~       .~       |   \\ -_    /  /-   /   ||      \   /
 * /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 * |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *          '         ~-|      /|    |-~\~~       __--~~
 *                      |-~~-_/ |    |   ~\_   _-~            /\
 *                           /  \     \__   \/~                \__
 *                       _--~ _/ | .-~~____--~-/                  ~~==.
 *                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                 -_     ~\      ~~---l__i__i__i--~~_/
 *                                 _-~-__   ~)  \--______________--~~
 *                               //.-~~~-~_--~- |-------~~~~~~~~
 *                                      //.-~~~--\
 *                               神兽保佑
 *                              代码无BUG!
*/
@Service
public class GoodsServiceImpl implements GoodsService {
    @Resource
    private GoodsDao goodsDao;

    @Override
    public List<Gnumber> QueryNumber(Integer gid) {
        return goodsDao.QueryNumber(gid);
    }

    @Override
    public List<Goods> QueryType(String goodname, Integer goodtype) {
        return goodsDao.QueryType(goodname, goodtype);
    }

    @Override
    public List<Goods> findByIds(int[] ids) {
        return goodsDao.findByIds(ids);
    }

    @Override
    public Goods findcid(Integer cid) {
        return goodsDao.findcid(cid);
    }

    @Override
    public Gnumber findgnid(Integer gnid) {
        return goodsDao.findgnid(gnid);
    }

    @Override
    public void updategoods(Integer gid, Integer cnumber) {
        goodsDao.updategoods(gid, cnumber);
    }

    @Override
    public void updategnumber(Integer gnid, Integer number) {
        goodsDao.updategnumber(gnid, number);
    }


/*
    public List<Goods> QueryAll() {
        return goodsDao.QueryAll();
    }
*/

}
